package com.mmall.controller.protal;

import com.github.pagehelper.PageInfo;
import com.mmall.common.Const;
import com.mmall.common.ResponseCode;
import com.mmall.common.ServerResponse;
import com.mmall.pojo.User;
import com.mmall.service.ISkillCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * @CLASS SkillCategoryController
 * @DESCRIPTION TODO
 * @AUTHor tang
 * @Date 2019-08-23 17:30
 * @VERSION 1.0
 **/
@Controller
@RequestMapping("/skillCategory")
public class SkillCategoryController {

    @Autowired
    private ISkillCategoryService iSkillCategoryService;

    @RequestMapping(value = "list",method = RequestMethod.POST)
    @ResponseBody
    public ServerResponse<PageInfo> list(
            Integer userId,
            @RequestParam(value = "pageNum",defaultValue = "1") int pageNum,
            @RequestParam(value = "pageSize",defaultValue = "10") int pageSize
    ){
        return iSkillCategoryService.list(userId,pageNum,pageSize);
    }
}
